Writes Array records to the specified file.
#include <File.au3>
_FileWriteFromArray($sFilePath, $a_Array [,$i_Base [, $i_UBound ]])
Parameters
$sFilePath | Path and filename of the file to write to. |
$a_Array | The array to be written to the file. |
$i_Base | Optional: Start Array index to read, normally set to 0 or 1. Default=0 |
$i_Ubound | Optional: Set to the last record you want to write to the File. default=0 - whole array. |
Return Value
Success: | Returns a 1 |
Failure: | Returns a 0 |
@Error: | 0 = No error. |
1 = Error opening specified file | |
2 = Input is not an Array |
Remarks
None.
Related
_FileReadToArray
Example
#include<Array.au3>
#include<File.au3>
Dim $a_Test
; Read file into array
_FileReadToArray("test.txt",$a_Test)
; reverse records
_ArrayReverse($a_Test,1)
; write reversed array to file
_FileWriteFromArray("test2.txt",$a_Test,1)